package com.scedu.demo1;
/*
代理类 实现租房接口
另外还有看房、收中介费、签合同等功能
 */
public class Proxy implements Rent{
    private Host host;

    public Proxy(Host host) {
        this.host = host;
    }

    public Proxy() {
    }
    //中介租房过程
    public void rent() {
        seeHouse();
        host.rent();
        hetong();
        fee();
    }
    //看房
    public  void seeHouse(){
        System.out.println("中介带你看房。");
    }
    //收中介费
    public  void fee(){
        System.out.println("收中介费。");
    }
    //签合同
    public  void  hetong(){
        System.out.println("签租赁合同。");
    }
}
